package com.googlecode.bip.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import javax.naming.NamingException;
import com.googlecode.bip.dao.utils.Listable;
import com.googlecode.bip.entity.IUserIgnoreQuestion;
import com.googlecode.bip.entity.UserIgnoreQuestion;

/**
 *
 * @author Claude CHOISNET
 */
public abstract class UserIgnoreQuestionDAO
        implements Listable<IUserIgnoreQuestion>
{
    private static final long serialVersionUID = 1L;

    /**
     * Build QuestionDAO
     */
    public UserIgnoreQuestionDAO()
    {
    }

    @Override //Listable<IQuestion>
    public IUserIgnoreQuestion newInstance( final ResultSet rSet )
        throws SQLException
    {
        return new UserIgnoreQuestion().set( rSet );
    }

   /**
    *
    * @param iduser
    * @return
    * @throws SQLException
    * @throws NamingException
    */
   public abstract List<IUserIgnoreQuestion> findUserIgnoreQuestion( int iduser )
       throws SQLException, NamingException;

   /**
    *
    * @param iduser
    * @return
    * @throws SQLException
    * @throws NamingException
    */
   public abstract List<Integer> findIgnoreQuestionList( int iduser )
       throws SQLException, NamingException;

   /**
    * Insert a new IUserIgnoreQuestion (must not exist)
    * @param iquestion
    * @return
    * @throws NamingException
    * @throws SQLException
    */
   public abstract boolean insertUserIgnoreQuestion( final IUserIgnoreQuestion iuiq )
       throws NamingException, SQLException;

   /**
    *
    * @param idquestion
    * @return
    * @throws NamingException
    * @throws SQLException
    */
   public abstract boolean deleteUserIgnoreQuestion( final IUserIgnoreQuestion iuiq )
       throws NamingException, SQLException;

   /**
    *
    * @param iduser
    * @param idquestionList
    * @throws SQLException
    * @throws NamingException
    */
   public abstract void deleteUserIgnoreQuestion(
           final int iduser,
           final List<Integer> idquestionList
           )
       throws SQLException, NamingException;

}
